<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/>

<xsl:template match="/">
  <html>
	<head>
	    <title>Advanced Databases</title>
	    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
	    <link rel="stylesheet" type="text/css" href="resources/style.css" media="screen"/>
	    <link rel="stylesheet" type="text/css" href="resources/rounded.css" media="screen"/>
	</head>  
  <body>
  
    <div id="header">
        <div id="logo"></div>
        <div id="menu">
        <ul>
            <li class="first_item"><a href="search.jsp">search</a></li>
            <li><a href="searchUser.jsp">users</a></li>
            <li><a href="ratings.jsp">total ratings</a></li>
            <li><a href="userIndex.jsp">home</a></li>
            <li><a href="logout.jsp">logout</a></li>
        </ul>
        </div>
    </div>
      
  <table>
  <tr><td>
  <h3>Top Albums</h3>
    <table border="1">
      <tr bgcolor="#9acd32">
        <th colSpan="2" align="left">Album</th>
      </tr>
      <xsl:for-each select="//music-album//album">
      <tr>
      	<td><img width="50" height="50"><xsl:attribute name="src"><xsl:value-of select="image/small"/></xsl:attribute></img></td>
        <td><xsl:value-of select="name"/><br/><b><xsl:value-of select="artist"/></b></td>
      </tr>
      </xsl:for-each>
    </table>
  </td>
  <td>
  <h3>Top Artist</h3>
    <table border="1">
      <tr bgcolor="#9acd32">
        <th colSpan="2" align="left">Artist</th>
      </tr>
      <xsl:for-each select="//music-artist//artist">
      <tr>
      	<td><img width="50" height="50"><xsl:attribute name="src"><xsl:value-of select="image"/></xsl:attribute></img></td>
        <td><xsl:value-of select="name"/><br/><b>Ranking: <xsl:value-of select="rank"/>, Play Count: <xsl:value-of select="playcount"/></b></td>
      </tr>
      </xsl:for-each>
    </table>    
  </td></tr>  
  </table>    
  </body>
  </html>
</xsl:template>
</xsl:stylesheet>